﻿bob.ns.setNs('bob.prop', {

    Property: function (value, bReadOnly, bWriteOnly) {

        var self = this;

        var _value = value;

        var _get_value = function () {
            return _value;
        };

        var _set_value = function (value) {
            _value = value;
        };

        if (!bReadOnly) {
            this.set_value = _set_value;
        }
        else {
            this.get_setter = function (bRetain) {
                if (!bRetain) {
                    delete self.get_setter;
                }
                return _set_value;
            };
        }

        if (!bWriteOnly) {
            this.get_value = _get_value;
        }
        else {
            this.get_getter = function (bRetain) {
                if (!bRetain) {
                    delete self.get_getter;
                }
                return _get_value;
            };
        }
    }

    //namedProp - implicity from _last.

    //v.2
    //propFunction - implicitly from _last.

    //namedPropFunction - implicitly from _last.

});
